package com.du.design.singleton;

/**
 * @desc: 内部类创建单例
 * @author: shuangdu
 * @date: 2021/4/30
 * @since: 1.8
 */
public class SingletonCode {

    private SingletonCode() {}

    private static class SingletonCodeHolder {
        private static SingletonCode singletonCode = new SingletonCode();
    }

    public static SingletonCode getInstance() {
        return SingletonCodeHolder.singletonCode;
    }

}
